package com.itheima.item.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.item.pojo.GoodInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface GoodsMapper extends BaseMapper<GoodInfo> {
    @Select("select * from tb_sku where id = #{id}")
    GoodInfo findGoodsById(Long id);

    @Select("select * from tb_sku where status = 1 limit #{a} , #{b}  ")
    List<GoodInfo> findByPage(@Param("a") int a, @Param("b") int b);
}
